package example.fileoperation.p06.b;
import java.io.File;
/**
 * @author 17976
 */
public class Main {
    public static void main(String[] args) {
        File f = null;
        try {
            f = File.createTempFile("tmp", ".txt", new File("C:/"));
            System.out.println("File path：" + f.getAbsolutePath());
            f.deleteOnExit();
            f = File.createTempFile("tmp", null, new File("D:/"));
            System.out.println("File path：" + f.getAbsolutePath());
            f.deleteOnExit();
        } catch (Exception e) {
            e.printStackTrace();
         }
        }
}
